1. Field of the Invention
The present invention is directed to a method and apparatus for handling window management instructions without post serialization in an out-of-order multi-issue processor.
2. Description of Related Art
As shown in FIG. 1, a computer (24) includes a processor (26), memory (28), a storage device (30), and numerous other elements and functionalities found in computers. The computer (24) may also include input means, such as a keyboard (32) and a mouse (34), and output means, such as a monitor (36). Those skilled in the art will appreciate that these input and output means may take other forms.
The processor (26) processes instructions determined by a program. Programs often have subroutines. A subroutine may be given a new register window in the processor (26) to receive values (e.g., local variables) from a program and possibly replace those values based on the instructions in the subroutine. A register window is a register (e.g., storage location) that initially receives values from a program in a parent register window. Values from the parent register window may be provided to a child register window. The child register window may provide values back to the parent register window and/or a grandchild register window. Depending on a processor's architecture, a register window structure may be many levels deep.
Window management instructions (e.g., SAVE, RESTORE, and RETURN) are used to create and release register windows, and write value(s) into a new register window. For example, SAVE creates a new register window and writes a value into the new register window. RESTORE releases a register window while updating a register in a previous, old register window. RETURN releases a register window without updating a value.
Instructions that follow a window management instruction should see a valid current window pointer. Accordingly, window management instructions are post serialized. In other words, a window management instruction must be committed before any instruction that follows the window management instruction is allowed to issue.
Window management instructions account for a significant amount of instructions in a program. Each time a window management instruction issues, performance is affected as instructions that follow a window management instruction are stalled until the window management instruction completes.